#pragma once
#include "HashBucket.hpp"

namespace lw
{
	template<class K, class Hash = Hash<K>, class Equal = Equal<K>>
	class unordered_set
	{
		struct SetKOfT
		{
			const K& operator()(const K& key) const
			{
				return key;
			}
		};
	public:
		typedef typename lw::HashBucket<K, K, SetKOfT, Hash, Equal>::iterator iterator;
		iterator begin()
		{
			return _hash.begin();
		}
		iterator end()
		{
			return _hash.end();
		}
		std::pair<iterator, bool> insert(const K& key)
		{
			return _hash.Insert(key);
		}
		bool erase(const K& key)
		{
			return _hash.Erase(key);
		}
		iterator find(const K& key)
		{
			return _hash.Find(key);
		}
	private:
		lw::HashBucket<K, K, SetKOfT, Hash, Equal> _hash;
	};
}